package com.yjm.test.Spring5.ch4.factoryBean;

import java.security.MessageDigest;

public class MessageDigestFactory {
	private String algorithmName = "MD5";
	
	public MessageDigest createInstance() throws Exception {
		return MessageDigest.getInstance(algorithmName);
	}

	public String getAlgorithmName() {
		return algorithmName;
	}

	public void setAlgorithmName(String algorithmName) {
		this.algorithmName = algorithmName;
	}
}
